home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / PInterfaces / SpeechRecognition.p < prev    next >
Encoding:
Text File  |  1997-08-12  |  21.6 KB  |  447 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        SpeechRecognition.p
  3.  
  4.      Contains:    Apple Speech Recognition Toolbox Interfaces.
  5.  
  6.      Version:    Technology:    PlainTalk 1.5
  7.                  Release:    Universal Interfaces 3.0.1
  8.  
  9.      Copyright:    © 1992-1997 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT SpeechRecognition;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __SPEECHRECOGNITION__}
  28. {$SETC __SPEECHRECOGNITION__ := 1}
  29.  
  30. {$I+}
  31. {$SETC SpeechRecognitionIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __TYPES__}
  35. {$I Types.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __MIXEDMODE__}
  38. {$I MixedMode.p}
  39. {$ENDC}
  40.  
  41.  
  42. {$PUSH}
  43. {$ALIGN MAC68K}
  44. {$LibExport+}
  45.  
  46. { Error Codes [Speech recognition gets -5100 through -5199] }
  47.  
  48. CONST
  49.     kSRNotAvailable                = -5100;                        {  the service requested is not avail or applicable  }
  50.     kSRInternalError            = -5101;                        {  a system internal or hardware error condition  }
  51.     kSRComponentNotFound        = -5102;                        {  a needed system resource was not located  }
  52.     kSROutOfMemory                = -5103;                        {  an out of memory error occurred in the toolbox memory space  }
  53.     kSRNotASpeechObject            = -5104;                        {  the object specified is no longer or never was valid  }
  54.     kSRBadParameter                = -5105;                        {  an invalid parameter was specified  }
  55.     kSRParamOutOfRange            = -5106;                        {  when we say 0-100, don't pass in 101.  }
  56.     kSRBadSelector                = -5107;                        {  an unrecognized selector was specified  }
  57.     kSRBufferTooSmall            = -5108;                        {  returned from attribute access functions  }
  58.     kSRNotARecSystem            = -5109;                        {  the object used was not a SRRecognitionSystem  }
  59.     kSRFeedbackNotAvail            = -5110;                        {  there is no feedback window associated with SRRecognizer  }
  60.     kSRCantSetProperty            = -5111;                        {  a non-settable property was specified  }
  61.     kSRCantGetProperty            = -5112;                        {  a non-gettable property was specified  }
  62.     kSRCantSetDuringRecognition    = -5113;                        {  the property can't be set while recognition is in progress -- do before or between utterances.  }
  63.     kSRAlreadyListening            = -5114;                        {  in response to SRStartListening  }
  64.     kSRNotListeningState        = -5115;                        {  in response to SRStopListening  }
  65.     kSRModelMismatch            = -5116;                        {  no acoustical models are avail to match request  }
  66.     kSRNoClientLanguageModel    = -5117;                        {  trying to access a non-specified SRLanguageModel  }
  67.     kSRNoPendingUtterances        = -5118;                        {  nothing to continue search on  }
  68.     kSRRecognitionCanceled        = -5119;                        {  an abort error occurred during search  }
  69.     kSRRecognitionDone            = -5120;                        {  search has finished, but nothing was recognized  }
  70.     kSROtherRecAlreadyModal        = -5121;                        {  another recognizer is modal at the moment, so can't set this recognizer's kSRBlockModally property right now  }
  71.     kSRHasNoSubItems            = -5122;                        {  SRCountItems or related routine was called on an object without subelements -- e.g. a word -- rather than phrase, path, or LM.  }
  72.     kSRSubItemNotFound            = -5123;                        {  returned when accessing a non-existent sub item of a container  }
  73.     kSRLanguageModelTooBig        = -5124;                        {  Cant build language models so big  }
  74.     kSRAlreadyReleased            = -5125;                        {  this object has already been released before  }
  75.     kSRAlreadyFinished            = -5126;                        {  the language model can't be finished twice  }
  76.     kSRWordNotFound                = -5127;                        {  the spelling couldn't be found in lookup(s)  }
  77.     kSRNotFinishedWithRejection    = -5128;                        {  property not found because the LMObj is not finished with rejection  }
  78.     kSRExpansionTooDeep            = -5129;                        {  Language model is left recursive or is embedded too many levels  }
  79.     kSRTooManyElements            = -5130;                        {  Too many elements added to phrase or path or other langauge model object  }
  80.     kSRCantAdd                    = -5131;                        {  Can't add given type of object to the base SRLanguageObject (e.g.in SRAddLanguageObject)     }
  81.     kSRSndInSourceDisconnected    = -5132;                        {  Sound input source is disconnected  }
  82.     kSRCantReadLanguageObject    = -5133;                        {  An error while trying to create new Language object from file or pointer -- possibly bad format  }
  83.                                                                 {  non-release debugging error codes are included here  }
  84.     kSRNotImplementedYet        = -5199;                        {  you'd better wait for this feature in a future release  }
  85.  
  86.  
  87. { Type Definitions }
  88.  
  89. TYPE
  90.     SRSpeechObject = ^LONGINT;
  91.     SRRecognitionSystem                    = SRSpeechObject;
  92.     SRRecognizer                        = SRSpeechObject;
  93.     SRSpeechSource                        = SRSpeechObject;
  94.     SRRecognitionResult                    = SRSpeechSource;
  95.     SRLanguageObject                    = SRSpeechObject;
  96.     SRLanguageModel                        = SRLanguageObject;
  97.     SRPath                                = SRLanguageObject;
  98.     SRPhrase                            = SRLanguageObject;
  99.     SRWord                                = SRLanguageObject;
  100. { between 0 and 100 }
  101.     SRSpeedSetting                        = INTEGER;
  102. { between 0 and 100 }
  103.     SRRejectionLevel                    = INTEGER;
  104. { When an event occurs, the user supplied proc will be called with a pointer    }
  105. {    to the param passed in and a flag to indicate conditions such                }
  106. {    as interrupt time or system background time.                                }
  107.     SRCallBackStructPtr = ^SRCallBackStruct;
  108.     SRCallBackStruct = RECORD
  109.         what:                    LONGINT;                                {  one of notification flags  }
  110.         message:                LONGINT;                                {  contains SRRecognitionResult id  }
  111.         instance:                SRRecognizer;                            {  ID of recognizer being notified  }
  112.         status:                    OSErr;                                    {  result status of last search  }
  113.         flags:                    INTEGER;                                {  non-zero if occurs during interrupt  }
  114.         refCon:                    LONGINT;                                {  user defined - set from SRCallBackParam  }
  115.     END;
  116.  
  117. { Call back procedure definition }
  118.     SRCallBackProcPtr = ProcPtr;  { PROCEDURE SRCallBack(VAR param: SRCallBackStruct); }
  119.  
  120.     SRCallBackUPP = UniversalProcPtr;
  121.  
  122. CONST
  123.     uppSRCallBackProcInfo = $000000C0;
  124.  
  125. FUNCTION NewSRCallBackProc(userRoutine: SRCallBackProcPtr): SRCallBackUPP;
  126.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  127.     INLINE $2E9F;
  128.     {$ENDC}
  129.  
  130. PROCEDURE CallSRCallBackProc(VAR param: SRCallBackStruct; userRoutine: SRCallBackUPP);
  131.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  132.     INLINE $205F, $4E90;
  133.     {$ENDC}
  134.  
  135. TYPE
  136.     SRCallBackParamPtr = ^SRCallBackParam;
  137.     SRCallBackParam = RECORD
  138.         callBack:                SRCallBackUPP;
  139.         refCon:                    LONGINT;
  140.     END;
  141.  
  142. { Recognition System Types }
  143.  
  144. CONST
  145.     kSRDefaultRecognitionSystemID = 0;
  146.  
  147. { Recognition System Properties }
  148.     kSRFeedbackAndListeningModes = 'fbwn';                        {  short: one of kSRNoFeedbackHasListenModes, kSRHasFeedbackHasListenModes, kSRNoFeedbackNoListenModes  }
  149.     kSRRejectedWord                = 'rejq';                        {  the SRWord used to represent a rejection  }
  150.     kSRCleanupOnClientExit        = 'clup';                        {  Boolean: Default is true. The rec system and everything it owns is disposed when the client application quits  }
  151.  
  152.     kSRNoFeedbackNoListenModes    = 0;                            {  next allocated recognizer has no feedback window and doesn't use listening modes     }
  153.     kSRHasFeedbackHasListenModes = 1;                            {  next allocated recognizer has feedback window and uses listening modes              }
  154.     kSRNoFeedbackHasListenModes    = 2;                            {  next allocated recognizer has no feedback window but does use listening modes      }
  155.  
  156. { Speech Source Types }
  157.     kSRDefaultSpeechSource        = 0;
  158.     kSRLiveDesktopSpeechSource    = 'dklv';                        {  live desktop sound input  }
  159.     kSRCanned22kHzSpeechSource    = 'ca22';                        {  AIFF file based 16 bit, 22.050 KHz sound input  }
  160.  
  161. { Notification via Apple Event or Callback }
  162. { Notification Flags }
  163.     kSRNotifyRecognitionBeginning = $00000001;                    {  recognition can begin. client must now call SRContinueRecognition or SRCancelRecognition  }
  164.     kSRNotifyRecognitionDone    = $00000002;                    {  recognition has terminated. result (if any) is available.  }
  165.  
  166. { Apple Event selectors }
  167. { AppleEvent message class  }
  168.     kAESpeechSuite                = 'sprc';
  169.  
  170. { AppleEvent message event ids }
  171.     kAESpeechDone                = 'srsd';
  172.     kAESpeechDetected            = 'srbd';
  173.  
  174. { AppleEvent Parameter ids }
  175.     keySRRecognizer                = 'krec';
  176.     keySRSpeechResult            = 'kspr';
  177.     keySRSpeechStatus            = 'ksst';
  178.  
  179. { AppleEvent Parameter types }
  180.     typeSRRecognizer            = 'trec';
  181.     typeSRSpeechResult            = 'tspr';
  182.  
  183.  
  184. { SRRecognizer Properties }
  185.     kSRNotificationParam        = 'noti';                        {  see notification flags below  }
  186.     kSRCallBackParam            = 'call';                        {  type SRCallBackParam  }
  187.     kSRSearchStatusParam        = 'stat';                        {  see status flags below  }
  188.     kSRAutoFinishingParam        = 'afin';                        {  automatic finishing applied on LM for search  }
  189.     kSRForegroundOnly            = 'fgon';                        {  Boolean. Default is true. If true, client recognizer only active when in foreground.     }
  190.     kSRBlockBackground            = 'blbg';                        {  Boolean. Default is false. If true, when client recognizer in foreground, rest of LMs are inactive.     }
  191.     kSRBlockModally                = 'blmd';                        {  Boolean. Default is false. When true, this client's LM is only active LM; all other LMs are inactive. Be nice, don't be modal for long periods!  }
  192.     kSRWantsResultTextDrawn        = 'txfb';                        {  Boolean. Default is true. If true, search results are posted to Feedback window  }
  193.     kSRWantsAutoFBGestures        = 'dfbr';                        {  Boolean. Default is true. If true, client needn't call SRProcessBegin/End to get default feedback behavior  }
  194.     kSRSoundInVolume            = 'volu';                        {  short in [0..100] log scaled sound input power. Can't set this property  }
  195.     kSRReadAudioFSSpec            = 'aurd';                        {  *FSSpec. Specify FSSpec where raw audio is to be read (AIFF format) using kSRCanned22kHzSpeechSource. Reads until EOF  }
  196.     kSRCancelOnSoundOut            = 'caso';                        {  Boolean: Default is true.  If any sound is played out during utterance, recognition is aborted.  }
  197.     kSRSpeedVsAccuracyParam        = 'sped';                        {  SRSpeedSetting between 0 and 100  }
  198.  
  199. { 0 means more accurate but slower. }
  200. { 100 means (much) less accurate but faster. }
  201.     kSRUseToggleListen            = 0;                            {  listen key modes  }
  202.     kSRUsePushToTalk            = 1;
  203.  
  204.     kSRListenKeyMode            = 'lkmd';                        {  short: either kSRUseToggleListen or kSRUsePushToTalk  }
  205.     kSRListenKeyCombo            = 'lkey';                        {  short: Push-To-Talk key combination; high byte is high byte of event->modifiers, the low byte is the keycode from event->message  }
  206.     kSRListenKeyName            = 'lnam';                        {  Str63: string representing ListenKeyCombo  }
  207.     kSRKeyWord                    = 'kwrd';                        {  Str255: keyword preceding spoken commands in kSRUseToggleListen mode  }
  208.     kSRKeyExpected                = 'kexp';                        {  Boolean: Must the PTT key be depressed or the key word spoken before recognition can occur?  }
  209.  
  210. { Operational Status Flags }
  211.     kSRIdleRecognizer            = $00000001;                    {  engine is not active  }
  212.     kSRSearchInProgress            = $00000002;                    {  search is in progress  }
  213.     kSRSearchWaitForAllClients    = $00000004;                    {  search is suspended waiting on all clients' input  }
  214.     kSRMustCancelSearch            = $00000008;                    {  something has occurred (sound played, non-speech detected) requiring the search to abort  }
  215.     kSRPendingSearch            = $00000010;                    {  we're about to start searching  }
  216.  
  217. { Recognition Result Properties }
  218.     kSRTEXTFormat                = 'TEXT';                        {  raw text in user supplied memory  }
  219.     kSRPhraseFormat                = 'lmph';                        {  SRPhrase containing result words  }
  220.     kSRPathFormat                = 'lmpt';                        {  SRPath containing result phrases or words  }
  221.     kSRLanguageModelFormat        = 'lmfm';                        {  top level SRLanguageModel for post parse  }
  222.  
  223. { SRLanguageObject Family Properties }
  224.     kSRSpelling                    = 'spel';                        {  spelling of a SRWord or SRPhrase or SRPath, or name of a SRLanguageModel  }
  225.     kSRLMObjType                = 'lmtp';                        {  Returns one of SRLanguageObject Types listed below  }
  226.     kSRRefCon                    = 'refc';                        {  4 bytes of user storage  }
  227.     kSROptional                    = 'optl';                        {  Boolean -- true if SRLanguageObject is optional     }
  228.     kSREnabled                    = 'enbl';                        {  Boolean -- true if SRLanguageObject enabled  }
  229.     kSRRepeatable                = 'rptb';                        {  Boolean -- true if SRLanguageObject is repeatable  }
  230.     kSRRejectable                = 'rjbl';                        {  Boolean -- true if SRLanguageObject is rejectable (Recognition System's kSRRejectedWord  }
  231.                                                                 {         object can be returned in place of SRLanguageObject with this property)     }
  232.     kSRRejectionLevel            = 'rjct';                        {  SRRejectionLevel between 0 and 100  }
  233.  
  234. { LM Object Types -- returned as kSRLMObjType property of language model objects }
  235.     kSRLanguageModelType        = 'lmob';                        {  SRLanguageModel  }
  236.     kSRPathType                    = 'path';                        {  SRPath  }
  237.     kSRPhraseType                = 'phra';                        {  SRPhrase  }
  238.     kSRWordType                    = 'word';                        {  SRWord  }
  239.  
  240. { a normal and reasonable rejection level }
  241.     kSRDefaultRejectionLevel    = 50;
  242.  
  243. {******************************************************************************}
  244. {                        NOTES ON USING THE API                                    }
  245. {                                                                                }
  246. {        All operations (with the exception of SRGetRecognitionSystem) are        }
  247. {        directed toward an object allocated or begot from New, Get and Read        }
  248. {        type calls.                                                                }
  249. {                                                                                }
  250. {        There is a simple rule in dealing with allocation and disposal:            }
  251. {                                                                                }
  252. {        *    all toolbox allocations are obtained from a SRRecognitionSystem        }
  253. {                                                                                }
  254. {        *    if you obtain an object via New or Get, then you own a reference     }
  255. {            to that object and it must be released via SRReleaseObject when        }
  256. {            you no longer need it                                                }
  257. {                                                                                }
  258. {        *    when you receive a SRRecognitionResult object via AppleEvent or        }
  259. {            callback, it has essentially been created on your behalf and so        }
  260. {            you are responsible for releasing it as above                        }
  261. {                                                                                }
  262. {        *    when you close a SRRecognitionSystem, all remaining objects which        }
  263. {            were allocated with it will be forcefully released and any            }
  264. {            remaining references to those objects will be invalid.                }
  265. {                                                                                }
  266. {        This translates into a very simple guideline:                            }
  267. {            If you allocate it or have it allocated for you, you must release    }
  268. {            it.  If you are only peeking at it, then don't release it.            }
  269. {                                                                                }
  270. {******************************************************************************}
  271. { Opening and Closing of the SRRecognitionSystem }
  272. FUNCTION SROpenRecognitionSystem(VAR system: SRRecognitionSystem; systemID: OSType): OSErr;
  273.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  274.     INLINE $303C, $0400, $AA56;
  275.     {$ENDC}
  276. FUNCTION SRCloseRecognitionSystem(system: SRRecognitionSystem): OSErr;
  277.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  278.     INLINE $303C, $0201, $AA56;
  279.     {$ENDC}
  280. { Accessing Properties of any Speech Object }
  281. FUNCTION SRSetProperty(srObject: SRSpeechObject; selector: OSType; property: UNIV Ptr; propertyLen: Size): OSErr;
  282.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  283.     INLINE $303C, $0802, $AA56;
  284.     {$ENDC}
  285. FUNCTION SRGetProperty(srObject: SRSpeechObject; selector: OSType; property: UNIV Ptr; VAR propertyLen: Size): OSErr;
  286.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  287.     INLINE $303C, $0803, $AA56;
  288.     {$ENDC}
  289. { Any object obtained via New or Get type calls must be released }
  290. FUNCTION SRReleaseObject(srObject: SRSpeechObject): OSErr;
  291.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  292.     INLINE $303C, $0204, $AA56;
  293.     {$ENDC}
  294. FUNCTION SRGetReference(srObject: SRSpeechObject; VAR newObjectRef: SRSpeechObject): OSErr;
  295.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  296.     INLINE $303C, $0425, $AA56;
  297.     {$ENDC}
  298. { SRRecognizer Instance Functions }
  299. FUNCTION SRNewRecognizer(system: SRRecognitionSystem; VAR recognizer: SRRecognizer; sourceID: OSType): OSErr;
  300.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  301.     INLINE $303C, $060A, $AA56;
  302.     {$ENDC}
  303. FUNCTION SRStartListening(recognizer: SRRecognizer): OSErr;
  304.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  305.     INLINE $303C, $020C, $AA56;
  306.     {$ENDC}
  307. FUNCTION SRStopListening(recognizer: SRRecognizer): OSErr;
  308.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  309.     INLINE $303C, $020D, $AA56;
  310.     {$ENDC}
  311. FUNCTION SRSetLanguageModel(recognizer: SRRecognizer; languageModel: SRLanguageModel): OSErr;
  312.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  313.     INLINE $303C, $040E, $AA56;
  314.     {$ENDC}
  315. FUNCTION SRGetLanguageModel(recognizer: SRRecognizer; VAR languageModel: SRLanguageModel): OSErr;
  316.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  317.     INLINE $303C, $040F, $AA56;
  318.     {$ENDC}
  319. FUNCTION SRContinueRecognition(recognizer: SRRecognizer): OSErr;
  320.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  321.     INLINE $303C, $0210, $AA56;
  322.     {$ENDC}
  323. FUNCTION SRCancelRecognition(recognizer: SRRecognizer): OSErr;
  324.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  325.     INLINE $303C, $0211, $AA56;
  326.     {$ENDC}
  327. FUNCTION SRIdle: OSErr;
  328.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  329.     INLINE $303C, $0028, $AA56;
  330.     {$ENDC}
  331. { Language Model Building and Manipulation Functions }
  332. FUNCTION SRNewLanguageModel(system: SRRecognitionSystem; VAR model: SRLanguageModel; name: UNIV Ptr; nameLength: Size): OSErr;
  333.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  334.     INLINE $303C, $0812, $AA56;
  335.     {$ENDC}
  336. FUNCTION SRNewPath(system: SRRecognitionSystem; VAR path: SRPath): OSErr;
  337.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  338.     INLINE $303C, $0413, $AA56;
  339.     {$ENDC}
  340. FUNCTION SRNewPhrase(system: SRRecognitionSystem; VAR phrase: SRPhrase; text: UNIV Ptr; textLength: Size): OSErr;
  341.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  342.     INLINE $303C, $0814, $AA56;
  343.     {$ENDC}
  344. FUNCTION SRNewWord(system: SRRecognitionSystem; VAR word: SRWord; text: UNIV Ptr; textLength: Size): OSErr;
  345.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  346.     INLINE $303C, $0815, $AA56;
  347.     {$ENDC}
  348. { Operations on any object of the SRLanguageObject family }
  349. FUNCTION SRPutLanguageObjectIntoHandle(languageObject: SRLanguageObject; lobjHandle: Handle): OSErr;
  350.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  351.     INLINE $303C, $0416, $AA56;
  352.     {$ENDC}
  353. FUNCTION SRPutLanguageObjectIntoDataFile(languageObject: SRLanguageObject; fRefNum: INTEGER): OSErr;
  354.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  355.     INLINE $303C, $0328, $AA56;
  356.     {$ENDC}
  357. FUNCTION SRNewLanguageObjectFromHandle(system: SRRecognitionSystem; VAR languageObject: SRLanguageObject; lObjHandle: Handle): OSErr;
  358.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  359.     INLINE $303C, $0417, $AA56;
  360.     {$ENDC}
  361. FUNCTION SRNewLanguageObjectFromDataFile(system: SRRecognitionSystem; VAR languageObject: SRLanguageObject; fRefNum: INTEGER): OSErr;
  362.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  363.     INLINE $303C, $0427, $AA56;
  364.     {$ENDC}
  365. FUNCTION SREmptyLanguageObject(languageObject: SRLanguageObject): OSErr;
  366.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  367.     INLINE $303C, $0218, $AA56;
  368.     {$ENDC}
  369. FUNCTION SRChangeLanguageObject(languageObject: SRLanguageObject; text: UNIV Ptr; textLength: Size): OSErr;
  370.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  371.     INLINE $303C, $0619, $AA56;
  372.     {$ENDC}
  373. FUNCTION SRAddLanguageObject(base: SRLanguageObject; addon: SRLanguageObject): OSErr;
  374.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  375.     INLINE $303C, $041A, $AA56;
  376.     {$ENDC}
  377. FUNCTION SRAddText(base: SRLanguageObject; text: UNIV Ptr; textLength: Size; refCon: LONGINT): OSErr;
  378.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  379.     INLINE $303C, $081B, $AA56;
  380.     {$ENDC}
  381. FUNCTION SRRemoveLanguageObject(base: SRLanguageObject; toRemove: SRLanguageObject): OSErr;
  382.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  383.     INLINE $303C, $041C, $AA56;
  384.     {$ENDC}
  385. { Traversing SRRecognitionResults or SRLanguageObjects }
  386. FUNCTION SRCountItems(container: SRSpeechObject; VAR count: LONGINT): OSErr;
  387.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  388.     INLINE $303C, $0405, $AA56;
  389.     {$ENDC}
  390. FUNCTION SRGetIndexedItem(container: SRSpeechObject; VAR item: SRSpeechObject; index: LONGINT): OSErr;
  391.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  392.     INLINE $303C, $0606, $AA56;
  393.     {$ENDC}
  394. FUNCTION SRSetIndexedItem(container: SRSpeechObject; item: SRSpeechObject; index: LONGINT): OSErr;
  395.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  396.     INLINE $303C, $0607, $AA56;
  397.     {$ENDC}
  398. FUNCTION SRRemoveIndexedItem(container: SRSpeechObject; index: LONGINT): OSErr;
  399.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  400.     INLINE $303C, $0408, $AA56;
  401.     {$ENDC}
  402. { Utilizing the System Feedback Window }
  403. FUNCTION SRDrawText(recognizer: SRRecognizer; dispText: UNIV Ptr; dispLength: Size): OSErr;
  404.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  405.     INLINE $303C, $0621, $AA56;
  406.     {$ENDC}
  407. FUNCTION SRDrawRecognizedText(recognizer: SRRecognizer; dispText: UNIV Ptr; dispLength: Size): OSErr;
  408.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  409.     INLINE $303C, $0622, $AA56;
  410.     {$ENDC}
  411. FUNCTION SRSpeakText(recognizer: SRRecognizer; speakText: UNIV Ptr; speakLength: Size): OSErr;
  412.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  413.     INLINE $303C, $0620, $AA56;
  414.     {$ENDC}
  415. FUNCTION SRSpeakAndDrawText(recognizer: SRRecognizer; text: UNIV Ptr; textLength: Size): OSErr;
  416.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  417.     INLINE $303C, $061F, $AA56;
  418.     {$ENDC}
  419. FUNCTION SRStopSpeech(recognizer: SRRecognizer): OSErr;
  420.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  421.     INLINE $303C, $0223, $AA56;
  422.     {$ENDC}
  423. FUNCTION SRSpeechBusy(recognizer: SRRecognizer): BOOLEAN;
  424.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  425.     INLINE $303C, $0224, $AA56;
  426.     {$ENDC}
  427. FUNCTION SRProcessBegin(recognizer: SRRecognizer; failed: BOOLEAN): OSErr;
  428.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  429.     INLINE $303C, $031D, $AA56;
  430.     {$ENDC}
  431. FUNCTION SRProcessEnd(recognizer: SRRecognizer; failed: BOOLEAN): OSErr;
  432.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  433.     INLINE $303C, $031E, $AA56;
  434.     {$ENDC}
  435.  
  436.  
  437. {$ALIGN RESET}
  438. {$POP}
  439.  
  440. {$SETC UsingIncludes := SpeechRecognitionIncludes}
  441.  
  442. {$ENDC} {__SPEECHRECOGNITION__}
  443.  
  444. {$IFC NOT UsingIncludes}
  445.  END.
  446. {$ENDC}
  447.